package Coding.Exception;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Final2 {

    public static void main(String[] args) {
        FileOutputStream fileOutputStream = null;
        try {
            fileOutputStream= new FileOutputStream("./demo");
            fileOutputStream.write(1);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            System.out.println("资源释放");
            try {
                fileOutputStream.close();
            } catch (IOException e) {

                e.printStackTrace();
            }
        }


    }
}
